<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="robots" content="all,follow">
    <!-- Bootstrap CSS-->
    <link rel="stylesheet" href="/mall/vendor/bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome CSS-->
    <link rel="stylesheet" href="/mall/vendor/font-awesome/css/font-awesome.min.css">
    <!-- Google fonts - Roboto -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,700">
    <!-- owl carousel-->
    <link rel="stylesheet" href="/mall/vendor/owl.carousel/assets/owl.carousel.css">
    <link rel="stylesheet" href="/mall/vendor/owl.carousel/assets/owl.theme.default.css">
    <!-- theme stylesheet-->
    <link rel="stylesheet" href="/mall/css/style.default.css" id="theme-stylesheet">
    <!-- Custom stylesheet - for your changes-->
    <link rel="stylesheet" href="/mall/css/custom.css">
    <!-- Favicon-->
    <link rel="shortcut icon" href="/mall/favicon.png">
    <!-- Tweaks for older IEs-->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]-->
</head>
<body th:fragment="head">

<nav class="navbar navbar-expand-lg">
    <div class="container">
        <a href="index.html" class="navbar-brand home"><img src="/mall/img/logo.png" alt="Obaju logo"
                                                            class="d-none d-md-inline-block"><img
                src="/mall/img/logo-small.png" alt="Obaju logo" class="d-inline-block d-md-none"><span
                class="sr-only">Obaju - go to homepage</span></a>
        <div class="navbar-buttons">
            <button type="button" data-toggle="collapse" data-target="#navigation"
                    class="btn btn-outline-secondary navbar-toggler"><span
                    class="sr-only">Toggle navigation</span><i
                    class="fa fa-align-justify"></i></button>
            <button type="button" data-toggle="collapse" data-target="#search"
                    class="btn btn-outline-secondary navbar-toggler"><span class="sr-only">Toggle search</span><i
                    class="fa fa-search"></i></button>
            <a href="basket.html" class="btn btn-outline-secondary navbar-toggler"><i
                    class="fa fa-shopping-cart"></i></a>
        </div>
        <div id="navigation" class="collapse navbar-collapse">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item"><a href="/MallGoods/index" class="nav-link active">首页</a></li>

            </ul>
            <div class="navbar-buttons d-flex justify-content-end">
                <!-- /.nav-collapse-->
                <div id="search-not-mobile" class="navbar-collapse collapse"></div>
                <a data-toggle="collapse" href="#search"
                   class="btn navbar-btn btn-primary d-none d-lg-inline-block"><span class="sr-only">search</span><i
                        class="fa fa-search"></i></a>
                <div th:if="${session.user != null}" id="basket-overview"
                     class="navbar-collapse collapse d-none d-lg-block"><a href="/MallCar/MyCar"
                                                                           class="btn btn-primary navbar-btn">
                    <i class="fa fa-shopping-cart"></i><span>购物车</span></a>
                </div>
                <div th:if="${session.user == null}" id="login" class="navbar-collapse collapse d-none d-lg-block"><a
                        data-toggle="modal"
                        class="btn btn-primary navbar-btn"
                        data-target="#login-modal"> <span>登录</span> </a></div>
                <div th:if="${session.user == null}" id="register" class="navbar-collapse collapse d-none d-lg-block"><a
                        href="/util/toMallPage?URL=register" class="btn btn-primary navbar-btn">
                    <span>注册</span></a></div>

                <div th:if="${session.user != null}" id="My" class="navbar-collapse collapse d-none d-lg-block"><a
                        href="/util/toMallPage?URL=customer-account" class="btn btn-primary navbar-btn">
                    <span>个人中心</span></a></div>
                <div id="login-modal" tabindex="-1" role="dialog" aria-labelledby="Login" aria-hidden="true"
                     class="modal fade">
                    <div class="modal-dialog modal-sm">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h5 class="modal-title">用户登录</h5>
                                <button type="button" data-dismiss="modal" aria-label="Close" class="close"><span
                                        aria-hidden="true">×</span></button>
                            </div>
                            <div class="modal-body">
                                <form action="/MallUser/UserLogin" method="post">
                                    <div class="form-group">
                                        <input name="userAccount" id="email-modal" type="text" placeholder="账号"
                                               class="form-control">
                                    </div>
                                    <div class="form-group">
                                        <input name="userPassword" id="password-modal" type="password" placeholder="密码"
                                               class="form-control">
                                    </div>
                                    <p class="text-center">
                                        <button type="submit" class="btn btn-primary"><i class="fa fa-sign-in"></i>登录
                                        </button>
                                    </p>
                                </form>
                                <p class="text-center text-muted">还未注册？</p>
                                <p class="text-center text-muted"><a
                                        href="/util/toMallPage?URL=register"><strong>现在注册</strong></a>！
                                    这很容易，在1分钟内完成，并给你特别折扣和更多!</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</nav>
<div id="search" class="collapse">
    <div class="container">
        <form action="/MallGoods/SelectBySomething" method="post" role="search" class="ml-auto">
            <div class="input-group">
                <input name="string" type="text" placeholder="Search" class="form-control">
                <div class="input-group-append">
                    <button type="submit" class="btn btn-primary"><i class="fa fa-search"></i></button>
                </div>
            </div>
        </form>
    </div>
</div>
<script src="/mall/vendor/jquery/jquery.min.js"></script>
<script src="/mall/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="/mall/vendor/jquery.cookie/jquery.cookie.js">
</script>
<script src="/mall/vendor/owl.carousel/owl.carousel.min.js"></script>
<script src="/mall/vendor/owl.carousel2.thumbs/owl.carousel2.thumbs.js"></script>
<script src="/mall/js/front.js"></script>

</body>
</html>